<?php

namespace app\api\validate;

use think\Validate;

class  GoodsValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'item' => 'require',
        'purchase_price' => 'require',
        'trade_price' => 'require',
        'retail_price' => 'require',
        'goods' => 'require|array',
//        'color' => 'require',
//        'size' => 'require',
        'images' => 'array',
    ];

    protected $msg = [
        'name.require' => '请输入商品名称',
        'item.require' => '请输入商品货号',
        'purchase_price.require' => '请输入采购价',
        'trade_price.require' => '请输入批发价',
        'retail_price.require' => '请输入零售价',
//        'color.require' => '请选择颜色',
        'size.require' => '请选择尺码'
    ];
}